<h2>Write post</h2>

<div class="form edit-post">
    <form action="<?php echo $t['submit_route']; ?>" method="post">
    <input type="hidden" name="post_id" id="fe-post_id" />
        <dl>
            <dt>Subject (not empty, max 255 symbols)</dt>
            <dd><input type="text" name="subject" id="fe-subject" /></dd>

            <dt>Shortcut</dt>
            <dd><input type="text" name="post_shortcut" id="fe-post_shortcut" /></dd>
            
            <dt>Post datetime (YYYY-MM-DD HH:mm)</dt>
            <dd><input type="text" name="post_date" id="fe-post_date" /></dd>

            <dt>Post tags</dt>
            <dd><input type="text" name="tags" id="fe-tags" value="" /></dd>

            <dt>Post body</dt>
            <dd><div><a target="_blank" href="<?php echo $ro->gen('extended_markup_cheatsheet');?>">Extended Markdown</a> is allowed</div>
            <textarea name="body" id="fe-body" cols="50" rows="20"></textarea></dd>

			<dt/>
			<dd>
				<div><label><input type="checkbox" name="published" id="fe-post_hidden"/> post is published</label></div>
				<div><label><input type="checkbox" name="comments_allowed"/> comments allowed</label></div>
			</dd>

            <dt/>
            <dd><input type="submit" value="submit"/>
            <input type="button" value="preview" onclick="show_comment_preview('fe-body');"/></dd>

    		<dt> </dt>
    		<dd><iframe class="hidden" name="preview_frame" id="e-preview_frame" style="width: 100%; height: 300px;"/></dd>
        </dl>
    </form>
</div>
<form target="preview_frame" id="e-preview_form" method="post" action="<?php echo $ro->gen('markup_preview');?>">
<input type="hidden" name="markup_text" id="fe-markup_text" value=""/>
<input type="hidden" name="markup_type" value="post"/>
</form>
